{extend name="public/base" /}

{block name="title"}<title>列表</title>{/block}

{block name="pjax_container"}
<style>
tr>th,td{
    text-align: center;
}
 
.content-header>.breadcrumb>li{
    color: #999;
}
.content-header>.breadcrumb>.active{
    color: #666;
}
.content-header{
    height: 51px;
 
}
.btn-primary{
      background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 5px 10px; 
}
.box-primary{
  border-top-color: #ecf0f5 !important;
  border-top-width: 16px;
  
}
.btn-primary:hover{
     background-color: #1890FF;
    color: #fff;
    border: none;
    opacity: .9;
    border-radius: 6px !important; 
}
.delete-one{
    background-color: ff4141 !important;
    margin-left: 15px;
    border-radius: 6px;
}
.sreachs{
       background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 7px 15px; 
}
.sreachs:hover{
       background-color: #1890FF;
    color: #fff;
    border: none;
    opacity: .8;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 7px 15px; 
}

</style>
<section class="content-header">
    <h1>企业注册记录</h1>
    <ol class="breadcrumb">
        <li>企业管理</li>
        <li class="active">企业注册记录</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">

                <div class="box-tools" style="margin:5px;">
                    <form id="form1" action="{:search_url(['status'])}" method="GET" pjax-search="">
                        <div class="input-group input-group-sm">

                            <!--<div class="form-group">
                                <label for="" class=" ">企业名称</label>
                                <input type="text" style="" name="name" class="" value="{:input('get.name')}" placeholder="" />
                                <label for="" class=" ">企业账号</label>
                                <input type="text" style="" name="account" class="" value="{:input('get.account')}" placeholder="" />
                            </div>-->

                            <div>
                                <label for="" class=" " style="margin-left: 10px;">处理状态:</label>
                                <select class="select2" name="status" style="width: 100px;display: inline-block;margin: 0px 5px;padding-left: 3px;border: 1px solid #ccc;height: 28px;border-radius: 3px;">
                                    <option value="-1">全部状态</option>
                                    <option value="0" {if condition="input('status', '-1') == 0"}selected{/if} >未处理</option>
                                    <option value="1" {if condition="input('status', '-1') == 1"}selected{/if} >已处理</option>
                                </select>
                                <!--<label style="margin-bottom:0;" for="">启动日期</label>
                                <input class="timepicker" name="start_time" value="{:input('get.start_time')}" placeholder=""  style="margin: 0px 5px;padding-left: 3px;border: 1px solid #ccc;height: 28px;border-radius: 3px;" AUTOCOMPLETE="off">-->
                                <div class="input-group-btn" style="display: inline-block;">
                                    <button type="submit" class="btn btn-default sreachs">
                                        <i class="fa fa-search"></i>查询
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

                <div class="box-body table-responsive">
                    <table class="table table-bordered table-hover">
                        <tr>
                            <th>手机号码</th>
                            <th>公司电话</th>
                            <th>公司负责人</th>
                            <th>企业名称</th>
                            <th>注册时间</th>
                            <th>处理状态</th>
                            <th>操作</th>
                        </tr>
                        {volist name="$list" id="v"}
                        <tr>
                            <td>{$v["mobile"]}</td>
                            <td>{$v["com_mobile"]}</td>
                            <td>{$v["principal"]}</td>
                            <td>{$v["name"]}</td>
                            <td>{:date('Y-m-d H:i', $v["create_time"])}</td>
                            <td>
                                <a href="javascript:void(0);" data-id="{$v['id']}" data-field="status"
                                   data-value="{$v['status']}" data-url="{:url('reg_index_up', ['id'=>$v['id']])}"
                                   class='editimg fa {if condition="$v.status == 0 "}fa-times-circle text-red{else /}fa-check-circle text-green{/if}'></a>
                            </td>
                            <td>
                                {:authAction(CONTROLLER_NAME.'/reg_del','delete_one',['id'=>$v['id']])}
                            </td>
                        </tr>
                        {/volist}
                    </table>
                </div>
                <div class="box-footer clearfix">
                    {$list->render()}
                </div>
            </div>
        </div>
    </div>
</section>
<script>
    $(function(){

        $(".select2").select2({language:"zh-CN"});

        // 列表部分 全选
        $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
            checkboxClass: 'icheckbox_minimal-blue',
            radioClass: 'iradio_minimal-blue'
        });
        $('.checkbox-toggle').on('ifChecked', function(event){
            var _this = $(this);
            var _table = _this.closest('.table');
            _table.find("tr td input[type='checkbox']").iCheck("check");
        });
        $('.checkbox-toggle').on('ifUnchecked', function(event){
            var _this = $(this);
            var _table = _this.closest('.table');
            _table.find("tr td input[type='checkbox']").iCheck("uncheck");
        });


        $('.timepicker').datetimepicker({
            format: "{$timepickerFormat | default='YYYY-MM-DD'}",   //YYYY-MM-DD HH:mm:ss
            locale: moment.locale('zh-cn')
        });
    });
</script>
{/block}
